package day5xia;

import org.junit.Test;

public class  ExtendConstract {

    @Test
    public void test01() {
        Poo c1 =new Poo();
        System.out.println("-------");
        Coo c2 = new Coo();
    }
}


class Poo{
    public Poo(){
        System.out.println("Poo无参构造");
    }
}

class Coo {
    public Coo() {
        System.out.println("Coo无参构造");
    }


    public Coo(String data) {
        System.out.println("Coo有参构造");
    }
}

class Goo{
    public long add(int a,long b){
        return a+b;
    }
}

class Koo extends Goo {
    public long add(int a, long b) {
        return a + b;
    }
}